#!/usr/bin/env python

TAM_BUFFER = 10
buffer = [str(i) for i in range(TAM_BUFFER)]

pa = 0

for i in range(pa, TAM_BUFFER):
    print buffer[i],
    
for i in range(0,pa):
    print buffer[i],
    
print


pa = 3

for i in range(pa, TAM_BUFFER):
    print buffer[i],
    
for i in range(0,pa):
    print buffer[i],
    
print


